package com.yjt.gcss.gddw.modules.txnSsds;

import javax.annotation.Resource;

import org.hibernate.criterion.MatchMode;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.yjt.common.easyui.datagrid.DataGridDTO;
import com.yjt.common.easyui.datagrid.DataGridJsonDTO;
import com.yjt.gcss.gddw.common.bean.domain.TxnSsds;
import com.yjt.gcss.gddw.common.dao.TxnSsdsDao;

@Service(TxnSsdsService.BEAN_PACKAGE_NAME)
@Transactional(readOnly=true)
public class TxnSsdsService {

	public static final String BEAN_PACKAGE_NAME = "com.yjt.gcss.gddw.modules.txnSsds.TxnSsdsService";
	
	@Resource(name = TxnSsdsDao.BEAN_PACKAGE_NAME)
	private TxnSsdsDao txnSsdsDao;
	
	public DataGridJsonDTO query(DataGridDTO _dataGridDto, TxnSsds queryModel) {
		DataGridJsonDTO result = txnSsdsDao.getBeansByBeanForPager(queryModel, MatchMode.ANYWHERE, _dataGridDto, true);
		return result;
	}
	
	public TxnSsds getTxnSsdsByReqMsgId(String reqMsgId) {
		TxnSsds queryModel = new TxnSsds();
		queryModel.setReqMsgId(reqMsgId);
		return txnSsdsDao.getBeanByBean(queryModel, MatchMode.EXACT);
	}
}
